#include "StdAfx.h"

#include "Chip Set Info.h"

using namespace StillDesign::NvApi;

ChipSetInfo ChipSetInfo::ToManaged( NV_CHIPSET_INFO info )
{
	ChipSetInfo chipSetInfo;
		chipSetInfo._version = info.version;
		chipSetInfo._vendorId = info.vendorId;
		chipSetInfo._deviceId = info.deviceId;
		chipSetInfo._vendorName = Functions::UnmanagedToManagedString( &info.szVendorName[ 0 ] );
		chipSetInfo._chipSetName = Functions::UnmanagedToManagedString( &info.szChipsetName[ 0 ] );
		chipSetInfo._flags = info.flags;
		chipSetInfo._subSysVendorId = info.subSysVendorId;
		chipSetInfo._subSysDeviceId = info.subSysDeviceId;
		chipSetInfo._subSysVendorName = Functions::UnmanagedToManagedString( &info.szSubSysVendorName[ 0 ] );
	
	return chipSetInfo;
}

int ChipSetInfo::Version::get()
{
	return _version;
}
int ChipSetInfo::VendorId::get()
{
	return _vendorId;
}
int ChipSetInfo::DeviceId::get()
{
	return _deviceId;
}
String^ ChipSetInfo::VendorName::get()
{
	return _vendorName;
}
String^ ChipSetInfo::ChipSetName::get()
{
	return _chipSetName;
}
int ChipSetInfo::Flags::get()
{
	return _flags;
}
int ChipSetInfo::SubSystemVendorId::get()
{
	return _vendorId;
}
int ChipSetInfo::SubSystemDeviceId::get()
{
	return _deviceId;
}
String^ ChipSetInfo::SubSystemVendorName::get()
{
	return _subSysVendorName;
}